from urllib import request, error

try: 
    res = request.urlopen('https://www.csc3.fun/momo')
except error.HTTPError as e:
    print(e.reason, e.headers, e.code, sep='\n')
except error.URLError as e:
    print(e.reason)
else: 
    print('Request Successfully')

